package com.cta.service.jms.consumer;

import javax.jms.JMSException;
import javax.jms.ObjectMessage;
import javax.jms.Session;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jms.listener.SessionAwareMessageListener;

import com.cta.jms.TransferObject;
import com.cta.service.core.Processor;

public class ConsumerService implements SessionAwareMessageListener<ObjectMessage> {

	@Autowired
	private Processor processorCdr;

	public void onMessage(ObjectMessage message, Session session) throws JMSException {
		processorCdr.onMessage((TransferObject)message.getObject());
	}

}
